{extend name="base_mobile" /}
{block name="css"}
<link rel="stylesheet" href="__CSS__/fonts.css">
{/block}
{block name="body"}
<header class="hui-header">
    <div id="hui-back"></div>
    <div id="hui-header-sreach">
    	<div id="hui-header-sreach-icon"></div>
            <form action="{:url('user/customer/index')}" class="layui-form" method="get">
                <input type="text" name="cname" id="searchKey" value="{:input('cname')}" autocomplete="off" placeholder="请输入客户名称" onkeydown="if(event.keyCode==13)return false;"  class="layui-input"/>
                <button class="layui-btn layui-btn-primary ajax-search"><i class="fa fa-search"></i></button>
            </form>
    </div>
    <div id="hui-header-menu" onclick="hui.showSlideMenu();"></div>
</header>
<div class="hui-wrap">
    <div style="padding-top:5px;">
        <a href="{:url('user/customer/remind', ['type' => 1])}" class="hui-button hui-button-small hui-fl {if condition="input('type') eq 1 or input('type') eq ''"}hui-danger{/if}" style="width:100%">今日待处理</a>
        <a href="{:url('user/customer/remind', ['type' => 2])}" class="hui-button hui-button-small hui-fl {if condition="input('type') eq 2"}hui-danger{/if}" style="width:50%">全部待处理</a>
        <a href="{:url('user/customer/remind', ['type' => 3])}" class="hui-button hui-button-small hui-fl {if condition="input('type') eq 3"}hui-danger{/if}" style="width:50%">已处理提醒</a>
        <a href="{:url('user/customer/remind', ['type' => 4])}" class="hui-button hui-button-small hui-fl {if condition="input('type') eq 4"}hui-danger{/if}" style="width:50%">待二次处理</a>
        <a href="{:url('user/customer/remind', ['type' => 5])}" class="hui-button hui-button-small hui-fl {if condition="input('type') eq 5"}hui-danger{/if}" style="width:50%">过期未处理</a>
    </div>
    <div class="hui-list" style="margin-top:18px;">
        {foreach name="list" item="v" empty="$empty"}
        <?php $customer = \app\common\model\Customer::get($v['cid']); ?>
        <a href="javascript:hui.open('{:url('user/customer/show', ['id' => $customer.id])}');">
            <div class="hui-list-icons">
                <img src="/static/hui/img/index/account.png" />
            </div>
            <div class="hui-list-text" style="font-weight: bold;">
                {$customer.cname}
                <div class="hui-list-info">
                    {:date('Y-m-d',$v['remind_time'])}
                </div>
            </div>
        </a>
        <a href="javascript:hui.open('{:url('user/customer/show', ['id' => $customer.id])}');">
            <div style="font-size:13px;color:#898989;padding-left:20px;padding-top:5px;line-height: 22px;">
                {$v.remark}
                <br>{:get_user_realname($v['uid'])} ：{if isset($v.jdata.web) and $v.jdata.web =='on'}<i class="fa fa-comment" aria-hidden="true" title="后台提醒"></i> {/if}
                        {if isset($v.jdata.wechat) and $v.jdata.wechat =='on'}<i class="fa fa-weixin" aria-hidden="true" title="微信提醒"></i> {/if}
                        {if isset($v.jdata.sms) and $v.jdata.sms =='on'}<i class="fa fa-envelope-open" aria-hidden="true" title="短信提醒"></i> {/if}
            </div>
        </a>
        <div style="padding-top:5px;">
            {if $v['status']=='0'}
            <a href="javascript:hui.open('{:url('user/customer/set_remind', ['id' => $v.id])}');" class="hui-button hui-button-small hui-fl" style="width:50%"><i class="fa fa-check-square-o"></i> 待处理</a>
            {else}
            <a href="javascript:hui.open('{:url('user/customer/set_remind', ['id' => $v.id])}');" class="hui-button hui-button-small hui-fl" style="width:50%"><i class="fa fa-check-square-o"></i> 已处理</a>
            {/if}
            
            <a href="javascript:hui.open('{:url('user/customer/del_remind', ['id' => $v.id])}');" class="hui-button hui-button-small hui-fl ajax-delete" style="width:50%"><i class="fa fa-trash-o"></i> 删 除</a>
        </div>
        {/foreach}
    </div>
    <div class="page" style="margin-bottom: 70px;">{$list->mobile_render()}</div>
    
</div>
{/block}